Optimal. Leaf size=130 \[ -\frac{\left (d h^2-e g h+f g^2\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right )}{h^2 \sqrt{a h^2+c g^2}}-\frac{\tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) (f g-e h)}{\sqrt{c} h^2}+\frac{f \sqrt{a+c x^2}}{c h} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.174346, antiderivative size = 130, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.172, Rules used = {1654, 844, 217, 206, 725} \[ -\frac{\left (d h^2-e g h+f g^2\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right )}{h^2 \sqrt{a h^2+c g^2}}-\frac{\tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) (f g-e h)}{\sqrt{c} h^2}+\frac{f \sqrt{a+c x^2}}{c h} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1654
Rule 844
Rule 217
Rule 206
Rule 725
Rubi steps
\begin{align*} \int \frac{d+e x+f x^2}{(g+h x) \sqrt{a+c x^2}} \, dx &=\frac{f \sqrt{a+c x^2}}{c h}+\frac{\int \frac{c d h^2-c h (f g-e h) x}{(g+h x) \sqrt{a+c x^2}} \, dx}{c h^2}\\ &=\frac{f \sqrt{a+c x^2}}{c h}-\frac{(f g-e h) \int \frac{1}{\sqrt{a+c x^2}} \, dx}{h^2}+\frac{\left (f g^2-e g h+d h^2\right ) \int \frac{1}{(g+h x) \sqrt{a+c x^2}} \, dx}{h^2}\\ &=\frac{f \sqrt{a+c x^2}}{c h}-\frac{(f g-e h) \operatorname{Subst}\left (\int \frac{1}{1-c x^2} \, dx,x,\frac{x}{\sqrt{a+c x^2}}\right )}{h^2}-\frac{\left (f g^2-e g h+d h^2\right ) \operatorname{Subst}\left (\int \frac{1}{c g^2+a h^2-x^2} \, dx,x,\frac{a h-c g x}{\sqrt{a+c x^2}}\right )}{h^2}\\ &=\frac{f \sqrt{a+c x^2}}{c h}-\frac{(f g-e h) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{\sqrt{c} h^2}-\frac{\left (f g^2-e g h+d h^2\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{c g^2+a h^2} \sqrt{a+c x^2}}\right )}{h^2 \sqrt{c g^2+a h^2}}\\ \end{align*}
Mathematica [A] time = 0.230856, size = 125, normalized size = 0.96 \[ \frac{-\frac{\left (h (d h-e g)+f g^2\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right )}{\sqrt{a h^2+c g^2}}+\frac{\tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) (e h-f g)}{\sqrt{c}}+\frac{f h \sqrt{a+c x^2}}{c}}{h^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.236, size = 453, normalized size = 3.5 \begin{align*}{\frac{f}{ch}\sqrt{c{x}^{2}+a}}+{\frac{e}{h}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){\frac{1}{\sqrt{c}}}}-{\frac{fg}{{h}^{2}}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){\frac{1}{\sqrt{c}}}}-{\frac{d}{h}\ln \left ({ \left ( 2\,{\frac{a{h}^{2}+c{g}^{2}}{{h}^{2}}}-2\,{\frac{cg}{h} \left ( x+{\frac{g}{h}} \right ) }+2\,\sqrt{{\frac{a{h}^{2}+c{g}^{2}}{{h}^{2}}}}\sqrt{ \left ( x+{\frac{g}{h}} \right ) ^{2}c-2\,{\frac{cg}{h} \left ( x+{\frac{g}{h}} \right ) }+{\frac{a{h}^{2}+c{g}^{2}}{{h}^{2}}}} \right ) \left ( x+{\frac{g}{h}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{{\frac{a{h}^{2}+c{g}^{2}}{{h}^{2}}}}}}}+{\frac{eg}{{h}^{2}}\ln \left ({ \left ( 2\,{\frac{a{h}^{2}+c{g}^{2}}{{h}^{2}}}-2\,{\frac{cg}{h} \left ( x+{\frac{g}{h}} \right ) }+2\,\sqrt{{\frac{a{h}^{2}+c{g}^{2}}{{h}^{2}}}}\sqrt{ \left ( x+{\frac{g}{h}} \right ) ^{2}c-2\,{\frac{cg}{h} \left ( x+{\frac{g}{h}} \right ) }+{\frac{a{h}^{2}+c{g}^{2}}{{h}^{2}}}} \right ) \left ( x+{\frac{g}{h}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{{\frac{a{h}^{2}+c{g}^{2}}{{h}^{2}}}}}}}-{\frac{f{g}^{2}}{{h}^{3}}\ln \left ({ \left ( 2\,{\frac{a{h}^{2}+c{g}^{2}}{{h}^{2}}}-2\,{\frac{cg}{h} \left ( x+{\frac{g}{h}} \right ) }+2\,\sqrt{{\frac{a{h}^{2}+c{g}^{2}}{{h}^{2}}}}\sqrt{ \left ( x+{\frac{g}{h}} \right ) ^{2}c-2\,{\frac{cg}{h} \left ( x+{\frac{g}{h}} \right ) }+{\frac{a{h}^{2}+c{g}^{2}}{{h}^{2}}}} \right ) \left ( x+{\frac{g}{h}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{{\frac{a{h}^{2}+c{g}^{2}}{{h}^{2}}}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{d + e x + f x^{2}}{\sqrt{a + c x^{2}} \left (g + h x\right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.21738, size = 186, normalized size = 1.43 \begin{align*} \frac{\sqrt{c x^{2} + a} f}{c h} + \frac{2 \,{\left (f g^{2} + d h^{2} - g h e\right )} \arctan \left (-\frac{{\left (\sqrt{c} x - \sqrt{c x^{2} + a}\right )} h + \sqrt{c} g}{\sqrt{-c g^{2} - a h^{2}}}\right )}{\sqrt{-c g^{2} - a h^{2}} h^{2}} + \frac{{\left (\sqrt{c} f g - \sqrt{c} h e\right )} \log \left ({\left | -\sqrt{c} x + \sqrt{c x^{2} + a} \right |}\right )}{c h^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]